home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / System / Utility Collections / SuperScrew / HangUp.c < prev    next >
C/C++ Source or Header  |  1992-09-28  |  897b  |  45 lines

  1. #include<Serial.h>
  2.  
  3. main()
  4. {
  5.   short  aOutRefNum, aInRefNum, bufferCnt, len;
  6.   char  *send;
  7.   SysPPtr  pSysParms;
  8.  
  9.        pSysParms = GetSysPPtr (  );
  10.        if (pSysParms->aTalkA)
  11.        {
  12.         aOutRefNum = -7;
  13.         aInRefNum = -6;
  14.         
  15.         len = 3;
  16.         
  17.         if (SerSetBuf( aOutRefNum, send, 3 ))
  18.         { SysBeep( 0 );
  19.          return;
  20.         }
  21.         
  22.         strcpy ( send , "+++" );
  23.  
  24.         if (FSWrite( aOutRefNum,  &len, send))
  25.         { SysBeep( 0 );
  26.          return;
  27.         }
  28.         len = 5;
  29.         if (SerSetBuf( aOutRefNum, send, len ))
  30.         { SysBeep( 0 );
  31.          return;
  32.         }
  33.        
  34.         strcpy ( send , "ATH\r" );
  35.         
  36.         if (FSWrite( aOutRefNum,  &len, send))
  37.         { SysBeep( 0 );
  38.          return;
  39.         }
  40.         
  41.         RAMSDClose(sPortA);
  42.         return;
  43.        }
  44.        return;                                        
  45. }